<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
        <div id="hotel">
            
        </div>
        <input type="button" value="Escreve" onclick="vaiEscrevendo();"/>
        <input type="button" value="Parar" onclick="parar();"/>
        <script>
            var intervalo;
            
            
            function vaiEscrevendo(){
              intervalo = setInterval(escreve,1000);  
               
            }
            function escreve()
            {
                document.getElementById('hotel').innerHTML+=" HOTEL ";
            }
            function parar(){
                clearInterval(intervalo);
            }
        </script>
    </body>
</html>
